package com.nave.princesslife.baseboard.icons;

import android.graphics.BitmapFactory;
import android.view.MotionEvent;

import com.nave.princesslife.R;
import com.nave.princesslife.main.Game;
import com.nave.princesslife.main.GameObject;

public class Closet extends GameObject {

	private static Closet instance;
	private static boolean touch;

	private Closet() {
	}

	public static Closet getInstance() {

		if (instance == null)
			instance = new Closet();

		return instance;
	}

	public void setup(int w, int h) {

		// Coletar a imagem na pasta res/drawable
		bitmap = BitmapFactory.decodeResource(Game.getContext_Game().getResources(), R.drawable.icon_closet);

		super.setup(w, h, 150f, 500f);

		// Reposicionando
		super.setY((h - bitmap.getHeight()) - verticalProportion * 30f);
	}

	public boolean touchEvent(MotionEvent me, int x, int y) {
		touch = super.touchEvent(me, x, y);

		return touch;
	}

	public static boolean isTouch() {
		return touch;
	}

	public static void setTouch(boolean touch) {
		Closet.touch = touch;
	}
}